<!--
 * @Author: LiZhiWei
 * @Date: 2025-07-15 16:54:19
 * @LastEditors: wjc
 * @LastEditTime: 2025-10-28 11:27:40
 * @Description: 
-->
<template>
  <Content :return-route="getReturnRoute()">
    <el-card shadow="hover">
      <template #header>
        <div class="font-s-20px">{{ model.page_title }}</div>
      </template>
      <div>
        <i class="i-custom-hash color-primary font-s-10px mr-4px"></i>
        <span class="color-info">{{ model.page_type_txt }}</span>
      </div>
      <Imager
        v-if="model.cover_url"
        :height="260"
        :url="model.cover_url"
        :width="750"
        :preview="false"
      />
      <div class="py-30px" v-html="model.page_text"></div>
      <div class="font-s-14px color-info">
        更新于 {{ model.updated_at }}
        <el-divider direction="vertical" />
        创建于 {{ model.created_at }}
      </div>
    </el-card>
  </Content>
</template>

<script setup lang="ts">
  import { useShower } from '#/hooks/useShower'

  defineOptions({
    name: `PageShow`,
  })

  const entity = 'Page'

  const { model, getReturnRoute, fetchData } = useShower({ entity, mode: 'page' })

  onMounted(() => {
    fetchData()
  })
</script>
